package pl.task;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SubActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sub_activity);


        final Button button = (Button) findViewById(R.id.back);
        button.setOnClickListener(new OnClickListener()
            {
                @Override
                public void onClick(View v)
                {
                    final Intent mainIntent = new Intent(Intent.ACTION_MAIN);
                    mainIntent.addCategory("pl.task.HOME");
                    startActivity(mainIntent);
                }
            });
    }

    public void startServiceClicked(View v)
    {
        Intent intent = new Intent(this, TaskService.class);
        startService(intent);
    }
}
